package com.xframe.xdal.core.exception;

import com.xframe.xdal.core.constant.ErrorCode;

/**
 * 功能描述:数据访问框架异常基类
 *
 * @author xufeng
 * @version 1.0
 * @date 2022-09-26
 */
public class DalFrameException extends RuntimeException{
    static final long serialVersionUID = 7232325274867867215L;

    /**
     * 错误码
     */
    protected int code;



    public DalFrameException(String message) {
        super(message);
        this.code = ErrorCode.DAL_UNKNOWN_ERROR;
    }

    public DalFrameException(int code,String message) {
        super(message);
        this.code = code;
    }


    public int getCode(){
        return this.code;
    }

}
